package com.linko.intelligent.sys.api;

import com.linko.intelligent.base.CommonResponse;
import com.linko.intelligent.sys.pojo.dto.NoticeDto;
import com.linko.intelligent.sys.pojo.po.Notice;
import com.linko.intelligent.sys.pojo.query.UserQuery;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author yuan
 * @create 2023/4/17 16:53
 */
@FeignClient(name = "linko-intelligent-sys-service")
@RequestMapping("/sys/notice")
public interface ApiNoticeService {

    @ApiOperation("新增")
    @PostMapping(value = "/save")
    public CommonResponse save(@RequestBody NoticeDto dto);

    @ApiOperation("新增List")
    @PostMapping(value = "/saveList")
    public CommonResponse saveList(@RequestBody List<NoticeDto> dtoList);

    @ApiOperation("详情")
    @GetMapping(value = "/{id}")
    public CommonResponse<Notice> get(@PathVariable("id") Long id);

    @ApiOperation("列表")
    @GetMapping(value = "/list")
    public CommonResponse<List<Notice>> list(@SpringQueryMap UserQuery query);
}
